﻿namespace Luka.Api.Controllers;

/// <summary>
/// 示例
/// </summary>
[Route("api/[controller]")]
[ApiController]
[ApiDescription(GroupName = "Test", Description = "这里展示的是示例", Order = 0)]
public class ExampleController : ControllerBase
{
    /// <summary>
    /// Get
    /// </summary>
    /// <returns></returns>
    public string Get() => "This is an example of a get request";

    /// <summary>
    /// Post
    /// </summary>
    /// <returns></returns>
    public string Post() => "This is an example of a post request";

    /// <summary>
    /// ExceptionError
    /// </summary>
    /// <returns></returns>
    [HttpPost]
    public void ExceptionError()
    {
        throw new Exception("");
    }
}